#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int fun(int a)
{
	int i, as, count;
	for (i = 2, count = 0; i <= a; i++)
	{
		if (a % i == 0)
		{
			count += (a / i);
		}
	}

	for (as = 0, i = 2; i <= count; i++)
	{
		if (count % i == 0)
		{
			as += (count / i);
		}
	}
	if (as == a && a != count)
	{
		return count;
	}
	else
	{
		return 0;
	}
}

int sum(int n, int w)
{
	printf("%d + ", n);
	int sum = n;
	for (int i = 1, number = n; i < w; i++)
	{
		number *= 10;
		number += n;
		sum += number;
		if (i == 1 || i == 2 || i == 3)
			printf("%d + ", number);
		if (i == w - 1)
		{
			printf("... + %d = ", number);
		}
	}
	return sum;
}